﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OneShoppingDAL;
using OneShoppingBLL;
using OneShoppingUtility;
using OneShoppingModel;

public partial class Backstage_Pages_sysmng_send_goods :BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {

            if (role.RoleId != 2)
            {
                UtilityMessageBox.Show(this, "您没有权限访问");
                return;
            }
            ActivityResult a = new ActivityResult();
            int resultId = Convert.ToInt32(Request["resultId"]);
            a = ActivityResultBLL.GetInstance().GetEntity(r => r.ResultId == resultId);
            a.Status = 2;
            UtilitySql.updateTables("Activity", "Status=4", "ListId='"+activitypurchasingViewBLL.GetInstance().GetEntity(r=>r.TradeId==a.TradeId).ListId+"'" );
            bool result = ActivityResultBLL.GetInstance().Update(a);
            if (!result)
            {
                Label1.Text = "发货失败，请重新在试";
            }
        }
        catch {
            UtilityMessageBox.Show(this, "您没有权限访问");
        
        }
    }
}